<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/modules/cms/front/include/taglib.jsp"%>
<!DOCTYPE html>
<html>
<head>
	<title>${course.name}</title>
	<meta name="decorator" content="ems_default_front"/>
	<meta name="description" content="${course.name}" />
	<meta name="keywords" content="${course.name}" />
	<link href="${ctxStatic}/jquery-validation/1.11.1/jquery.validate.min.css" type="text/css" rel="stylesheet" />
	<script src="${ctxStatic}/jquery-validation/1.11.1/jquery.validate.min.js" type="text/javascript"></script>
	<script src="${ctxStatic}/jquery-validation/1.11.1/jquery.validate.method.min.js" type="text/javascript"></script>
	
	<script type="text/javascript">
		$(document).ready(function() {
			<c:if test="${not empty message}">alert("${message}");</c:if>
			$("#joinForm").validate({
				rules: {
					validateCode: {remote: "${pageContext.request.contextPath}/servlet/validateCodeServlet"}
				},
				messages: {
					content: {required: "请填写留言内容"},
					validateCode: {remote: "验证码不正确"}
				},
				/* errorContainer: "#messageBox", */
				errorPlacement: function(error, element) {
					if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
						error.appendTo(element.parent().parent());
					} else {
						error.insertAfter(element);
					}
				}
			});
			/* $("#main_nav li").each(function(){
				$(this).toggleClass("active", $(this).text().indexOf('公共留言')>=0);
			}); */
		});
	</script>
</head>
<body>
	<div class="content">
 	<div class="weizhi">
		<div class="fl wz1"><img src="${ctxStatic }/sxdw/img/wzico.png"/></div>
		<div class="fl wz2">当前位置：<A href="${ctx }">首页</A>--${course.name }<a href="${ctx}/ems/joinSearch?sign=${course.sign}" class="selbtn fr">查询报名情况</a></div>
	</div>
	<div class="clear"></div> 
	 <div class="cmain">
	 <h3>${course.name }</h3>
	 
	 <div class="contentmain pt20">
	 <!------->
	   <form id="joinForm" action="${ctx }/ems/saveJoin" method="post">
	   
	   <input type="hidden" id="orderId" name="order.id">
	   <input type="hidden" id="courseId" name="course.id" value="${course.id }">
	   <input type="hidden" id="token" name="token" value="${token }">
	   <input type="hidden" id="orderFrom" name="orderFrom" value="pc">
	   
	   <div class="gul">
		 
		 <div class="fli">
		  	<textarea placeholder="选手姓名" id="joiner" name="joiner" style="height: 100px;" class="sinput" onkeyup="count('joiner','${course.oneMoney}','${course.multiMoney}','joinType');" onpaste="countPaste('joiner','${course.oneMoney}','${course.multiMoney}','joinType');"></textarea>
		  	</br><span class="help-inline"><font color="red">*多个姓名请以逗号隔开</font> </span>
		  </div>
		  
		 <div class="fli">
		  	<select class="sinput" id="groupType" name="groupType">
		  	<!-- course_group_type  -->
		  		<option value="">组别</option>
		  		<c:forEach items="${fns:getDictList('course_group_type')}" var="groupType">
		  			<option value="${groupType.value }">${groupType.label }</option>
		  		</c:forEach>
		  		
		  	</select>
		 </div>
		 
		 <div class="fli">
		 	<select class="sinput" id="bigCategory" name="bigCategory" onchange="setSubCategory(this,'smallCategory');">
		 		<option value="">${course.sign eq 'paint'?'展示类型':'展示大类'}</option>
		 		
		 		<c:forEach items="${bigCategories}" var="bigCat">
		  			<option value="${bigCat.value }" type="${bigCat.type}">${bigCat.name }</option>
		  		</c:forEach>
		 	</select>
		 </div>
		 
		 
		 <div class="fli" id="subCategoryDiv" style="display: ${course.sign eq 'paint'?'none':'block'}">
		 	<select id="smallCategory" name="smallCategory" class="sinput">
		 		<option value="">展示小类</option>
		 		<!-- <option>个人</option>
		 		<option>组合</option>
		 		<option>集体</option> -->
		 	</select>
		 </div>
		 
		 <div class="fli">
		 	<select class="sinput" id="joinType" name="joinType" onchange="count('joiner','${course.oneMoney}','${course.multiMoney}','joinType');">
		 		<option value="">展示方式</option>
		 		<c:forEach items="${fns:getDictList('course_join_type')}" var="groupType">
		  			<option value="${groupType.value }">${groupType.label }</option>
		  		</c:forEach>
		 	</select>
		 </div>
		 
		  <div class="fli">
		 	<input class="sinput" id="school" name="school" type="text"  placeholder="推选学校"/>
		 </div>
		  <div class="fli">
		  	<input class="sinput" id="remarks" name="remarks" type="text" placeholder="备注(初选地点)"/>
		  </div>
		  
		  <div class="fli">
	  	 	<input class="sinput" id="register" name="register" type="text" placeholder="家长姓名"/>
	  	 </div>
		 <div class="fli">
		 	<input class="sinput" id="mobile" name="mobile" type="text" placeholder="家长电话"/>
		 </div>
		  
		  <div class="fli">
				<label class="control-label">验证码:</label>
				<sys:validateCode name="validateCode" />
		  </div>
		  
		  <div class="fli" id="confirmDiv" style="display: none;">
		  	报名人数:<font id="joinNum" color="red" style="font-size: 18px;font-weight: 600;">0</font>人,
		  	&nbsp;应付金额:<font id="joinMoney" color="red" style="font-size: 18px;font-weight: 600;">0.00</font>元
		  </div>
		  
		  <Div class="fli" >  <input id="subButton" class="sbtn" onclick="saveJion('joinForm','${course.sign}');" type="button" value="确认信息"  /> </Div>
	   </div>
	   </form>
	   <br/><br/><br/>
	 <!-------->
	 </div>
	 </div>
	 
<div class="clear"></div> 
</div>
</body>
</html>